package org.flower.entity;

/**
 * 购物车实体类
 */
public class ShoppingCart {
    /**
     * 编号
     */
    private int id;
    /**
     * 商品编号
     */
    private int comDetailsId;
    /**
     * 用户编号
     */
    private int userId;
    /**
     * 商品数量
     */
    private int num;
    /**
     * 是否勾选
     */
    private boolean flag;

    /**
     * 商品对象
     */
    private CommodityDetails commodity;

    public ShoppingCart() {}

    public ShoppingCart(int id, int comDetailsId, int userId, int num, boolean flag) {
        this.id = id;
        this.comDetailsId = comDetailsId;
        this.userId = userId;
        this.num = num;
        this.flag = flag;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setComDetailsId(int comDetailsId) {
        this.comDetailsId = comDetailsId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public void setCommodity(CommodityDetails commodity) {
        this.commodity = commodity;
    }

    public int getId() {
        return id;
    }

    public int getComDetailsId() {
        return comDetailsId;
    }

    public int getUserId() {
        return userId;
    }

    public int getNum() {
        return num;
    }

    public boolean isFlag() {
        return flag;
    }

    public CommodityDetails getCommodity() {
        return commodity;
    }
}
